<%@ page language="java" pageEncoding="UTF-8" %>
<%
    String path = request.getContextPath();
    if (path.endsWith("/"))
        path = path.substring(0, path.length() - 1);
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path;
    request.setAttribute("root", basePath);
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>健康金订单支付</title>
      <%@include file="import.jsp"%>
  </head>
  <body>
  <div data-role="page"  data-theme="c" >
      <div data-role="header">
          <h1>健康金支付</h1>
      </div>
      <div data-role="content">

          <div>
              <h5>商户编号(${pid})-订单编号</h5><label>${transactionid}</label><br/>
              <h5>商户名称(${name})</h5>
              <h5>总金额</h5><label>${orderamount}</label>
          </div>

          <div><h4>您在中国人寿保险公司投保“国寿鸿康保险组合计划”保单号</h4><label>2132135466443</label>

              <div><h2>已为您理赔</h2><label>0.00</label></div>
          </div>
          <div><label><h2>您还需微信支付</h2>&nbsp;￥：${orderamount}</label></div>
          <input id="payIt" type="button" value="确认支付" data-theme="e" data-corners="false"/>
      </div>
  </div>
  <script type="text/javascript">
      $(function(){
        $("#payIt").click(function(){
            if (typeof(WeixinJSBridge) == 'undefined') {
                alert("请使用微信浏览器支付");
                return;
            }
            $(this).disabled = true;
            WeixinJSBridge.invoke('getBrandWCPayRequest',{
                appId: "wxf8b4f85f3a794e77",
                "timeStamp" : "189026618",
                "nonceStr" : "adssdasssd13d",
                "package": "bank_type=WX&body=XXX&fee_type=1&input_charset=GBK&notify_url=http%3a%2f%2fwww.qq.com&out_trade_no=16642817866003386000&partner=1900000109&spbill_create_ip=127.0.0.1&total_fee=1&sign=BEEF37AD19575D92E191C1E4B1474CA9",
                "signType":"SHA1",
                "paySign" : "7717231c335a05165b1874658306fa431fe9a0de"
            },function(res){
                alert("支付结果："+res.err_msg);
                $(this).disabled = false;
            });
        });
      });
  </script>
  </body>
</html>
